import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'mobx-react';
import { HashRouter as Router, Route, Switch } from 'react-router-dom';
import { FloatingTouch, DocumentTitle } from 'weaver-mobile-page';

import './style';

const Home = (props)=>props.children;

const Root = () => {
  const data = [];
  return (
    <Provider>
      <Router>
        <FloatingTouch homeBtnTips="">
          <DocumentTitle data={data} defaultTitle="" />
          <Route
            name="home"
            path="/"
            render={props => (
              <Switch>
                <Route name="app" path="app/:uuid" component={Home} />
              </Switch>
            )}
          />
        </FloatingTouch>
      </Router>
    </Provider>
  )
};

render(<Root />, document.getElementById('root'));